<?php
require_once '../../global.inc.php';
//SESSION中取出会员资料信息
$instanceInfo		 	= $_SESSION["instanceInfo"];
$instanceId				= $instanceInfo["instance_id"];
$memberInfo 			= $_SESSION["memberInfo"];

$op						= $_GET["op"];

if($op=="edit"){
	$instanceMemberInfo		= $_SESSION["instanceMemberInfo"];
}else{
	$instanceMemberInfo = "";
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.input1 {
	width:100%;
}
textarea {
	width:100%;
	resize:none;
	font-size: 12px;
}
div{margin:0 10px}
.STYLE1  {color: #e1e2e3; font-size: 12px;}
.STYLE6  {color: #000000; font-size: 12px;}
.STYLE10 {color: #000000; font-size: 12px;}
.STYLE19 {color: #344b50; font-size: 12px;}
.STYLE21 {color: #3b6375; font-size: 12px;}
.STYLE22 {color: #295568; font-size: 12px;}

-->
</style>
<script type="text/javascript" src="js/checkForm.js"></script>
<script type="text/javascript" src="js/instanceMember.js"></script>
</head>

<body>
<?php if($op=="add"){
	echo "<div align='center'><h3>会员参加活动录入</h3></div>";
 }else if($op=="edit"){
	echo "<div align='center'><h3>会员参加活动修改</h3></div>";
}
 ?>
<form action="../../action/instanceMemberAction.php?op=<?php echo $op?>"  method="post" onsubmit="return checkInstanceMember()">
<input type="hidden" id="instanceId" name="instanceId" value="<?php echo $instanceId?>"/>
<input type="hidden" id="memberId"   name="memberId"   value="<?php echo $memberInfo['member_id']?>"/>
<input type="hidden" id="saleFee"    name="saleFee"    value="<?php echo $instanceInfo['sale_fee']?>"/>

<table align="center" width="70%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a8c7ce">
	<tr>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">会员姓名：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input readonly="readonly" class="input1" type="text" id = "memberName" name="memberName" value="<?php echo $memberInfo['member_name']?>"/></div></td>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">会员卡号：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input readonly="readonly" class="input1" type="text" id = "memberNo" name="memberNo" value="<?php echo $memberInfo['member_no']?>"/></div></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">活动定金：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input readonly="readonly" class="input1" type="text" id = "frontFee" name="frontFee" value="<?php echo $instanceInfo['front_fee']?>"/></div></td>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">已交定金：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input   class="input1" type="text" id = "payFee" name="payFee" value="<?php echo $instanceMemberInfo['pay_fee']?>"/></div></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">会员积分：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input readonly="readonly" class="input1" type="text" id = "score" name="score" value="<?php echo $memberInfo['score']?>"/></div></td>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">本次使用积分：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input   class="input1" type="text" id = "payScore" name="payScore" value="<?php echo $instanceMemberInfo['pay_score']?>"/></div></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">优惠额度：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input   class="input1" type="text" id = "discountFee" name="discountFee" value="<?php echo $instanceMemberInfo['discount_fee']?>"/></div></td>
		<td width="20%" bgcolor="d3eaef" class="STYLE6"><div align="left"><span class="STYLE10">备注：</span></div></td>
		<td bgcolor="#FFFFFF" class="STYLE6"><div align="center"><input   class="input1" type="text" id = "comments" name="comments" value="<?php echo $instanceMemberInfo['comments']?>"/></div></td>
	</tr>
	<tr bgcolor="#FFFFFF">
	<?php 
	  if($op=="add"){
		echo "<td colspan='4'><div align='center'><input type='submit' id = 'submit' name='submit' value='加入'/>";
	  }else if($op=="edit"){
		echo "<td colspan='4'><div align='center'><input type='submit' id = 'submit' name='submit' value='修改'/>";
	  }
	?>
    	<input type="button" id = "button1" name="button1" value="返回" onclick="javascript:window.close();"/></div></td>
    </tr>
</table>
</form>
</body>
</html>
